 <?php 
 
	class Personne{
		private $id_pers;
		private $nom_pers;
		private $prenom_pers;
		private $num_fix_pers;
		private $num_port_pers;
		private $email_pers;
		private $genre_pers;
		private $adresse_pers;

		
	public function __construct($valeur = array()){
	if(!empty($valeur)){
		$this->affecte($valeur);
		
		}
	} 

	public function affecte($donnees){
		foreach ($donnees as  $attribut => $valeur){
			switch($attribut){
				case 'id_pers': $this->setIdPers($valeur);
					break;
				case 'nom_pers': $this->setNomPers($valeur);
					break;
				case 'prenom_pers': $this->setPrenomPers($valeur);
					break;
				case 'num_fix_pers': $this->setNumFixPers($valeur);
					break;
				case 'email_pers': $this->seteMailPers($valeur);
					break;
				case 'num_port_pers': $this->setNumPortPers($valeur);
					break;

				case 'genre_pers' : $this->setGenrePers($valeur);
					break;
                case 'adresse_pers': $this->setAdressePers($valeur);
                    break;
			}
		}
	}



        /**
         * @param mixed $email_pers
         */
        public function setEmailPers($email_pers)
        {
            $this->email_pers = $email_pers;
        }

        /**
         * @return mixed
         */
        public function getEmailPers()
        {
            return $this->email_pers;
        }

        /**
         * @param mixed $genre_pers
         */
        public function setGenrePers($genre_pers)
        {
            $this->genre_pers = $genre_pers;
        }

        /**
         * @return mixed
         */
        public function getGenrePers()
        {
            return $this->genre_pers;
        }

        /**
         * @param mixed $id_pers
         */
        public function setIdPers($id_pers)
        {
            $this->id_pers = $id_pers;
        }

        /**
         * @return mixed
         */
        public function getIdPers()
        {
            return $this->id_pers;
        }



        /**
         * @param mixed $nom_pers
         */
        public function setNomPers($nom_pers)
        {
            $this->nom_pers = $nom_pers;
        }

        /**
         * @return mixed
         */
        public function getNomPers()
        {
            return $this->nom_pers;
        }

        /**
         * @param mixed $num_fix_pers
         */
        public function setNumFixPers($num_fix_pers)
        {
            $this->num_fix_pers = $num_fix_pers;
        }

        /**
         * @return mixed
         */
        public function getNumFixPers()
        {
            return $this->num_fix_pers;
        }

        /**
         * @param mixed $num_port_pers
         */
        public function setNumPortPers($num_port_pers)
        {
            $this->num_port_pers = $num_port_pers;
        }

        /**
         * @return mixed
         */
        public function getNumPortPers()
        {
            return $this->num_port_pers;
        }

        /**
         * @param mixed $prenom_pers
         */
        public function setPrenomPers($prenom_pers)
        {
            $this->prenom_pers = $prenom_pers;
        }

        /**
         * @return mixed
         */
        public function getPrenomPers()
        {
            return $this->prenom_pers;
        }


        /**
         * @return mixed
         */
        public function getAdressePers()
        {
            return $this->adresse_pers;
        }

        /**
         * @param mixed $adresse_pers
         */
        public function setAdressePers($adresse_pers)
        {
            $this->adresse_pers = $adresse_pers;
        }


    }


 
 ?>